namespace ShareMarking.Entity {
    	using System;


    /// <summary>
    /// 表名：qr_QrCodeRelate 主键列：RelateQRID
    /// </summary>
    [SerializableAttribute()]
    public partial class qr_QrCodeRelate : MySoft.Data.Entity
    {

        protected Int32 _RelateQRID;

        protected Int32? _qr_Type;

        protected Int32? _qr_CodeID;

        protected String _qr_Scene_ID;

        protected Int32? _rel_ForeignID;

        protected String _rel_Code;

        protected DateTime? _CreateOn;

        protected DateTime? _DateModified;

        protected Boolean? _IsDelete;

        public Int32 RelateQRID
        {
            get
            {
                return this._RelateQRID;
            }
            set
            {
                this.OnPropertyValueChange(_.RelateQRID, _RelateQRID, value);
                this._RelateQRID = value;
            }
        }

        public Int32? qr_Type
        {
            get
            {
                return this._qr_Type;
            }
            set
            {
                this.OnPropertyValueChange(_.qr_Type, _qr_Type, value);
                this._qr_Type = value;
            }
        }

        public Int32? qr_CodeID
        {
            get
            {
                return this._qr_CodeID;
            }
            set
            {
                this.OnPropertyValueChange(_.qr_CodeID, _qr_CodeID, value);
                this._qr_CodeID = value;
            }
        }

        public String qr_Scene_ID
        {
            get
            {
                return this._qr_Scene_ID;
            }
            set
            {
                this.OnPropertyValueChange(_.qr_Scene_ID, _qr_Scene_ID, value);
                this._qr_Scene_ID = value;
            }
        }

        public Int32? rel_ForeignID
        {
            get
            {
                return this._rel_ForeignID;
            }
            set
            {
                this.OnPropertyValueChange(_.rel_ForeignID, _rel_ForeignID, value);
                this._rel_ForeignID = value;
            }
        }

        public String rel_Code
        {
            get
            {
                return this._rel_Code;
            }
            set
            {
                this.OnPropertyValueChange(_.rel_Code, _rel_Code, value);
                this._rel_Code = value;
            }
        }

        public DateTime? CreateOn
        {
            get
            {
                return this._CreateOn;
            }
            set
            {
                this.OnPropertyValueChange(_.CreateOn, _CreateOn, value);
                this._CreateOn = value;
            }
        }

        public DateTime? DateModified
        {
            get
            {
                return this._DateModified;
            }
            set
            {
                this.OnPropertyValueChange(_.DateModified, _DateModified, value);
                this._DateModified = value;
            }
        }

        public Boolean? IsDelete
        {
            get
            {
                return this._IsDelete;
            }
            set
            {
                this.OnPropertyValueChange(_.IsDelete, _IsDelete, value);
                this._IsDelete = value;
            }
        }

        /// <summary>
        /// 获取实体对应的表名
        /// </summary>
        protected override MySoft.Data.Table GetTable()
        {
            return new MySoft.Data.Table<qr_QrCodeRelate>("qr_QrCodeRelate");
        }

        /// <summary>
        /// 获取实体中的标识列
        /// </summary>
        protected override MySoft.Data.Field GetIdentityField()
        {
            return _.RelateQRID;
        }

        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        protected override MySoft.Data.Field[] GetPrimaryKeyFields()
        {
            return new MySoft.Data.Field[] {
    					_.RelateQRID};
        }

        /// <summary>
        /// 获取列信息
        /// </summary>
        protected override MySoft.Data.Field[] GetFields()
        {
            return new MySoft.Data.Field[] {
    					_.RelateQRID,
    					_.qr_Type,
    					_.qr_CodeID,
    					_.qr_Scene_ID,
    					_.rel_ForeignID,
    					_.rel_Code,
    					_.CreateOn,
    					_.DateModified,
    					_.IsDelete};
        }

        /// <summary>
        /// 获取列数据
        /// </summary>
        protected override object[] GetValues()
        {
            return new object[] {
    					this._RelateQRID,
    					this._qr_Type,
    					this._qr_CodeID,
    					this._qr_Scene_ID,
    					this._rel_ForeignID,
    					this._rel_Code,
    					this._CreateOn,
    					this._DateModified,
    					this._IsDelete};
        }

        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        protected override void SetValues(MySoft.Data.IRowReader reader)
        {
            if ((false == reader.IsDBNull(_.RelateQRID)))
            {
                this._RelateQRID = reader.GetInt32(_.RelateQRID);
            }
            if ((false == reader.IsDBNull(_.qr_Type)))
            {
                this._qr_Type = reader.GetInt32(_.qr_Type);
            }
            if ((false == reader.IsDBNull(_.qr_CodeID)))
            {
                this._qr_CodeID = reader.GetInt32(_.qr_CodeID);
            }
            if ((false == reader.IsDBNull(_.qr_Scene_ID)))
            {
                this._qr_Scene_ID = reader.GetString(_.qr_Scene_ID);
            }
            if ((false == reader.IsDBNull(_.rel_ForeignID)))
            {
                this._rel_ForeignID = reader.GetInt32(_.rel_ForeignID);
            }
            if ((false == reader.IsDBNull(_.rel_Code)))
            {
                this._rel_Code = reader.GetString(_.rel_Code);
            }
            if ((false == reader.IsDBNull(_.CreateOn)))
            {
                this._CreateOn = reader.GetDateTime(_.CreateOn);
            }
            if ((false == reader.IsDBNull(_.DateModified)))
            {
                this._DateModified = reader.GetDateTime(_.DateModified);
            }
            if ((false == reader.IsDBNull(_.IsDelete)))
            {
                this._IsDelete = reader.GetBoolean(_.IsDelete);
            }
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            if ((obj == null))
            {
                return false;
            }
            if ((false == typeof(qr_QrCodeRelate).IsAssignableFrom(obj.GetType())))
            {
                return false;
            }
            if ((((object)(this)) == ((object)(obj))))
            {
                return true;
            }
            return false;
        }

        public class _
        {

            /// <summary>
            /// 表示选择所有列，与*等同
            /// </summary>
            public static MySoft.Data.AllField All = new MySoft.Data.AllField<qr_QrCodeRelate>();

            /// <summary>
            /// 字段名：RelateQRID - 数据类型：Int32
            /// </summary>
            public static MySoft.Data.Field RelateQRID = new MySoft.Data.Field<qr_QrCodeRelate>("RelateQRID");

            /// <summary>
            /// 字段名：qr_Type - 数据类型：Int32(可空)
            /// </summary>
            public static MySoft.Data.Field qr_Type = new MySoft.Data.Field<qr_QrCodeRelate>("qr_Type");

            /// <summary>
            /// 字段名：qr_CodeID - 数据类型：Int32(可空)
            /// </summary>
            public static MySoft.Data.Field qr_CodeID = new MySoft.Data.Field<qr_QrCodeRelate>("qr_CodeID");

            /// <summary>
            /// 字段名：qr_Scene_ID - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field qr_Scene_ID = new MySoft.Data.Field<qr_QrCodeRelate>("qr_Scene_ID");

            /// <summary>
            /// 字段名：rel_ForeignID - 数据类型：Int32(可空)
            /// </summary>
            public static MySoft.Data.Field rel_ForeignID = new MySoft.Data.Field<qr_QrCodeRelate>("rel_ForeignID");

            /// <summary>
            /// 字段名：rel_Code - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field rel_Code = new MySoft.Data.Field<qr_QrCodeRelate>("rel_Code");

            /// <summary>
            /// 字段名：CreateOn - 数据类型：DateTime(可空)
            /// </summary>
            public static MySoft.Data.Field CreateOn = new MySoft.Data.Field<qr_QrCodeRelate>("CreateOn");

            /// <summary>
            /// 字段名：DateModified - 数据类型：DateTime(可空)
            /// </summary>
            public static MySoft.Data.Field DateModified = new MySoft.Data.Field<qr_QrCodeRelate>("DateModified");

            /// <summary>
            /// 字段名：IsDelete - 数据类型：Boolean(可空)
            /// </summary>
            public static MySoft.Data.Field IsDelete = new MySoft.Data.Field<qr_QrCodeRelate>("IsDelete");
        }
    }
}
